#include "StdAfx.h"
#include "Tracker.h"
#include "zero0Doc.h"
#include "zero0View.h"
CTracker::CTracker(void)
{
}

CPoint CTracker::GetCenterPoint()
{
	return CenterPoint;
}

CTracker::CTracker(CShape *Shape)
{
	
		CenterPoint=Shape->GetPoint();
		LeftUpPoint=Shape->Getpoint_1();
		UpMiddlePoint=Shape->Getpoint_2();
		RightUpPoint=Shape->Getpoint_3();
		MiddleRightPoint=Shape->Getpoint_4();
		RightDownPoint=Shape->Getpoint_5();
		DownMiddlePoint=Shape->Getpoint_6();
		LeftDownPoint=Shape->Getpoint_7();
		MiddleLeftPoint=Shape->Getpoint_8();

}


void CTracker::SetTacker(CShape *Shape)
{
	CenterPoint=Shape->GetPoint();
	LeftUpPoint=Shape->Getpoint_1();
	UpMiddlePoint=Shape->Getpoint_2();
	RightUpPoint=Shape->Getpoint_3();
	MiddleRightPoint=Shape->Getpoint_4();
	RightDownPoint=Shape->Getpoint_5();
	DownMiddlePoint=Shape->Getpoint_6();
	LeftDownPoint=Shape->Getpoint_7();
	MiddleLeftPoint=Shape->Getpoint_8();
}

void CTracker::ShowTracker(CDC *pDC)
{
	pDC->Rectangle(LeftUpPoint.x-9,LeftUpPoint.y-9,LeftUpPoint.x-1,LeftUpPoint.y-1);
	pDC->Rectangle(UpMiddlePoint.x-4,UpMiddlePoint.y-9,UpMiddlePoint.x+4,UpMiddlePoint.y-1);
	pDC->Rectangle(RightUpPoint.x+1,RightUpPoint.y-9,RightUpPoint.x+9,RightUpPoint.y-1);
	pDC->Rectangle(MiddleRightPoint.x+1,MiddleRightPoint.y-4,MiddleRightPoint.x+9,MiddleRightPoint.y+4);
	pDC->Rectangle(RightDownPoint.x+1,RightDownPoint.y+1,RightDownPoint.x+9,RightDownPoint.y+9);
	pDC->Rectangle(DownMiddlePoint.x-4,DownMiddlePoint.y+1,DownMiddlePoint.x+4,DownMiddlePoint.y+9);
	pDC->Rectangle(LeftDownPoint.x-9,LeftDownPoint.y+1,LeftDownPoint.x-1,LeftDownPoint.y+9);
	pDC->Rectangle(MiddleLeftPoint.x-9,MiddleLeftPoint.y-4,MiddleLeftPoint.x-1,MiddleLeftPoint.y+4);
}

CTracker::~CTracker(void)
{
}
